<?php
/**
 * Created by PhpStorm.
 * User: robot
 * Date: 2018-04-26
 * Time: 16:52
 */

namespace app\base\validate;


use think\Validate;

class BooksValidate extends Validate
{

    protected $rule = [
        'book_name|书籍名称' => 'require',
        'book_auth|作者' => 'require',
        'book_man|出版社' => 'require',
        'book_dec|描述' => 'max:300',
        'book_num|描述' => 'require|number',
    ];
    protected $message = [
        'book_name.require' => '请输入书籍名称',
        'book_auth.require' => '请输入书籍作者',
        'book_man.require' => '请输入书籍出版社',
        'book_dec.max' => '描述文字请在300字之内',
        'book_num.require' => '请输入书籍数量',
        'book_num.number' => '书籍数量请输入整数',
    ];


}